import Vue from 'vue';
import Vuex from 'vuex';
import actions from './api';

Vue.use(Vuex);

export default new Vuex.Store({
  actions,
  state: {
    //模态框类型
    modalStatus: "",
    //模态框是否显示
    showModal: false,
  },
  getters: {

  },

  mutations: {

    //更新模态框类型
    updateModalStatus(state, modalStatus) {
      state.modalStatus = modalStatus;
    },

    //模态框状态更新，是否弹出，true是，false否
    showModal(state, showModal) {
      state.showModal = showModal;
    },


  }
});
